module one {
	export function getCookie(name) {

		var cookieVal = "";
		var strCookie = document.cookie;
		var arrCookie = strCookie.split("; ");
		for (var i = 0; i < arrCookie.length; i++) {
			var arr = arrCookie[i].split("=");
			if (arr[0] == "userLoginInfo") {
				cookieVal = decodeURIComponent(arr[1]);
				break;
			}
		}

		if (cookieVal != null && cookieVal != "") {
			cookieVal = decodeURI(cookieVal);
			return JSON.parse(cookieVal)[name];
		}

		return null;
	}
}